home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 November / Chip_2004-11_cd1.bin / zkuste / dolby / download / dvdlab / DVDlabProRC2b.exe / {app} / Extras / Script / Infinity.talk < prev    next >
Text File  |  2004-03-22  |  1KB  |  56 lines

  1. /*    Link Bitmap 1.0
  2.     by Oscar, 12 Dec 2003
  3.     
  4.     To run this: DROP the Script from Assets to the Object in Menu.
  5.     
  6.     Some interesting repeating effect. It grabs the object image, then resize it and overlay it
  7.     on the object itself.
  8.     Now it repeat this few times in a loop to get the repeating effects.
  9.     
  10.     Note: because of the bitmap merging, the text will become not-editable after you apply this
  11. */
  12.  
  13. // Get the current menu and selected object when you drag and drop script
  14. // Note: if testing from Script editor make sure you have just one menu opened on desktop,
  15. //       in such case the MenuGetCurSel will return currently opened menu 
  16.  
  17. menu = MenuGetCurSel() 
  18. // VTS menu 1..255, VMG menu 10001..10255 
  19.  
  20. // show the current menu on top of all others
  21. MenuActivate(menu)
  22.  
  23. object= ObjectGetCurSel(menu) 
  24.  
  25. if (object==0) then
  26.     print "No object Selected"
  27.     end
  28. endif
  29.  
  30.  
  31. ObjectMergeShadow(menu,object)
  32. // save original image
  33. ImgGrabObject(2,menu,object)
  34.  
  35. nW = ImgGetWidth(2)
  36. nH = ImgGetHeight(2)
  37.  
  38. //**********
  39. // these 2 params can be changed for different effect
  40. stepdown = 30
  41. repeat = 10
  42.  
  43. step2 = stepdown/2
  44.  
  45. ProgressBar(0,repeat,"Infiniting ;-)")
  46.  
  47. for x = 1 to repeat
  48.     ProgressSetPos(x)
  49.     ImgGrabObject(1,menu,object)
  50.  
  51.     ImgResize(1,nW-stepdown,nH-stepdown)
  52.     // copy alpha from original (2) to working buffer (1)
  53.     ImgOverlay(1,2,step2,step2)
  54.     ImgSetToObject(2,menu,object)
  55. next x